<#assign module="chart"/>

<@override name="header">
<link rel="stylesheet" href="${ctx}/assets/css/datetimepicker.css">
<style>
	.table > thead > tr > th {
	    text-align:center;
	}
	.table > tbody > tr > td{
		vertical-align:middle;
		text-align:center;
	}
</style>

</@override>
<@override name="body">
<div class="row">
	<div class="col-xs-13">
		<div class="col-md-2">
			<ul class="list-group">
	        	<#--
	        	<li class="list-group-item"><a  href="${ctx}/chart/heatMap">热力图</a></li>
	        	-->
	        	<@daijia>
		        <li class="list-group-item"><a  href="${ctx}/chart/compositive">代驾订单汇总</a></li>
		        </@daijia>
				<@pao>
				<li class="list-group-item"><a  href="${ctx}/chart/paotuiCompositive">跑腿订单汇总</a></li>
				</@pao>
				<@zhuan>
				<li class="list-group-item"><a  href="${ctx}/chart/zhuanCompositive">专车订单汇总</a></li>
				</@zhuan>
				<@freight>
				<li class="list-group-item"><a  href="${ctx}/chart/freightCompositive">货运订单汇总</a></li>
				</@freight>
				<@zhuanxian>
				<li class="list-group-item"><a  href="${ctx}/chart/zhuanxianCompositive">快车订单汇总</a></li>
				</@zhuanxian>
		        <li class="list-group-item"><a  href="${ctx}/chart/orderYearChart">订单统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/orderType">订单来源统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/memberOrder1">客户消费统计</a></li>
				<li class="list-group-item"><a  href="${ctx}/chart/tableNewMemberMonth">新增客户统计</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/driverOrder">服务人员业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/introduce">推荐员工业绩</a></li>
			    <li class="list-group-item"><a  href="${ctx}/chart/infoFee">保险费/信息费</a></li>
			    <@shiro.isMainCompany>
			    <li class="list-group-item"><a  href="${ctx}/chart/companyOrder">公司统计</a></li>
			    </@shiro.isMainCompany>
			    <!-- <li class="list-group-item"><a  href="${ctx}/chart/activity">活动统计</a></li> -->
			    <li class="list-group-item"><a  href="${ctx}/chart/driverTime">服务人员在线时间统计</a></li>
		    </ul>
		</div>
		 
		<div class="col-md-10">
		
			<div role="tabpanel">
			    <!-- Tab panes -->
			    <div class="tab-content">
				    <div role="tabpanel" class="tab-pane fade in active" id="tab1">
				    	<div class="row">
							<div class="col-xs-12">
								<form class="form-inline" id="SearchForm" method="get">
									<@shiro.isMainCompany>
										<select class="form-control" name="companyId" id="companyId">
								  			<#list companys as company>
								  				<option value="${company.id}" <#if companyId?? && companyId==company.id>selected="selected"</#if>>${company.abbreviation}</option>
								  			</#list>
							  			</select>
					  				</@shiro.isMainCompany>
							  		
								  	<div class="input-group">
										<input id="startTime" type="text" class="form-control" placeholder="开始时间" />
									</div>
									
								  	<div class="form-group">
								  		<input id="endTime" type="text" class="form-control" placeholder="结束时间" />
								    </div>
								    
								    <div class="form-group">
								        <button type="button" id="search_button" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i> 查询</button>
								   		<button  id="export_button"  type="button" class="btn btn-primary"><i class="glyphicon glyphicon-save"></i>导出</button>
					    				 <@shiro.isMainCompany>
					    					<input type="checkbox" name="companyAll" value="true" checked />导出全部公司
					    				  </@shiro.isMainCompany>
								    </div>
								   
							    </form>
						    </div>
					    </div>
			
						
   									  
						<div class="row margin-top">
							<div class="col-xs-12">
								<@shiro.isMainCompany>
									<p>所有公司汇总：</p>
									
									<p>所有单量:<b id="totalAmount"></b>单 &nbsp;&nbsp; 所有销单量:<b id="totalCancelAmount"></b>单 &nbsp;&nbsp; 所有订单金额:<b id="totalRealCash"></b>元 &nbsp;&nbsp; 所有优惠券:<b id="totalCouponMoney"></b>元 &nbsp;&nbsp; 所有支付金额:<b id="totalPayMoney"></b>元</p> 
									
									<p>所有公司收入:<b id="totalCompanyMoney"></b>元 &nbsp;&nbsp; 所有服务人员收入:<b id="totalDriverMoney"></b>元&nbsp;&nbsp; 所有过路费:<b id="totalGuoluMoney"></b>元 &nbsp;&nbsp; 所有客户经理提成:<b id="totalManagerMoney"></b>元 &nbsp;&nbsp; 所有保险费/信息费:<b id="totalInfofee"></b>元 &nbsp;&nbsp; 所有介绍提成:<b id="totalRebateMoney"></b>元</p> 
								</@shiro.isMainCompany>
								<div class="table-responsive margin-top">
									<div class="panel panel-primary">
									  <table class="table table-hover table-striped table-bordered">
									  	<thead>
									  		<tr style="font-size:14px;">
									  			<th colspan="9"><span id="companyName"></span> 货运订单汇总统计</th>
									  		</tr>
									  	</thead>
									  	<tbody>
									  		<tr>
									  			<td rowspan="3">#</td>
									  			<td colspan="5">由本公司创建的订单</td>
									  			<td colspan="2">调入订单</td>
									  			<td rowspan="3">&nbsp;&nbsp;&nbsp;共计&nbsp;&nbsp;&nbsp;</td>
									  		</tr>
									  		<tr>
									  			<td colspan="2">由本公司服务人员完成订单</td>
									  			<td colspan="2">由平台其它公司服务人员完成订单（外派）</td>
									  			<td rowspan="2">销单</td>
									  			<td colspan="2">平台其它公司创建、由本公司服务人员完成的订单</td>
									  		</tr>
									  		<tr>
									  			<td>完成订单</td>
									  			<td>执行中</td>
									  			<td>完成订单</td>
									  			<td>执行中</td>
									  			<td>完成订单</td>
									  			<td>执行中</td>
									  		</tr>
									  		<tr>
									  			<td>单量（单）</th>
									  			<td id="orderFinishedAmount_this"></td>
									  			<td id="orderBusyAmount_this"></th>
									  			<td id="orderFinishedAmount_getout"></td>
									  			<td id="orderBusyAmount_getout"></td>
									  			<td id="orderCanceledAmount"></td>
									  			<td id="orderFinishedAmount_comein"></th>
									  			<td id="orderBusyAmount_comein"></th>
									  			<td id="orderTotalAmount"></th>
									  		</tr>
									  		<tr>
									  			<td>订单总金额（元）</th>
									  			<td id="orderFinishedMoney_this"></td>
									  			<td id="orderBusyMoney_this"></th>
									  			<td id="orderFinishedMoney_getout"></td>
									  			<td id="orderBusyMoney_getout"></td>
									  			<td id="orderCanceledMoney"></td>
									  			<td id="orderFinishedMoney_comein"></th>
									  			<td id="orderBusyMoney_comein"></th>
									  			<td id="orderTotalMoney"></th>
									  		</tr>
									  		<tr>
									  			<td>优惠券（元）</th>
									  			<td id="orderFinishedCouponMoney_this"></td>
									  			<td id="orderBusyCouponMoney_this"></th>
									  			<td id="orderFinishedCouponMoney_getout"></td>
									  			<td id="orderBusyCouponMoney_getout"></td>
									  			<td id="orderCanceledCouponMoney"></td>
									  			<td id="orderFinishedCouponMoney_comein"></th>
									  			<td id="orderBusyCouponMoney_comein"></th>
									  			<td id="orderTotalCouponMoney"></th>
									  		</tr>
									  		<tr>
									  			<td>支付金额（元）</th>
									  			<td id="orderFinishedPayMoney_this"></td>
									  			<td id="orderBusyPayMoney_this"></th>
									  			<td id="orderFinishedPayMoney_getout"></td>
									  			<td id="orderBusyPayMoney_getout"></td>
									  			<td id="orderCanceledPayMoney"></td>
									  			<td id="orderFinishedPayMoney_comein"></th>
									  			<td id="orderBusyPayMoney_comein"></th>
									  			<td id="orderTotalPayMoney"></th>
									  		</tr>
									  		<tr>
									  			<td>公司收入（元）</th>
									  			<td id="orderFinishedCompanyMoney_this"></td>
									  			<td id="orderBusyCompanyMoney_this"></th>
									  			<td id="orderFinishedCompanyMoney_getout"></td>
									  			<td id="orderBusyCompanyMoney_getout"></td>
									  			<td id="orderCanceledCompanyMoney"></td>
									  			<td id="orderFinishedCompanyMoney_comein"></th>
									  			<td id="orderBusyCompanyMoney_comein"></th>
									  			<td id="orderTotalCompanyMoney"></th>
									  		</tr>
									  		<tr>
									  			<td>服务人员收入（元）</th>
									  			<td id="orderFinishedDriverMoney_this"></td>
									  			<td id="orderBusyDriverMoney_this"></th>
									  			<td id="orderFinishedDriverMoney_getout"></td>
									  			<td id="orderBusyDriverMoney_getout"></td>
									  			<td id="orderCanceledDriverMoney"></td>
									  			<td id="orderFinishedDriverMoney_comein"></th>
									  			<td id="orderBusyDriverMoney_comein"></th>
									  			<td id="orderTotalDriverMoney"></th>
									  		</tr>
									  		<tr>
									  			<td>保险费/信息费（元）</th>
									  			<td id="orderFinishedInfofee_this"></td>
									  			<td id="orderBusyInfofee_this"></th>
									  			<td id="orderFinishedInfofee_getout"></td>
									  			<td id="orderBusyInfofee_getout"></td>
									  			<td id="orderCanceledInfofee"></td>
									  			<td id="orderFinishedInfofee_comein"></th>
									  			<td id="orderBusyInfofee_comein"></th>
									  			<td id="orderTotalInfofee"></th>
									  		</tr>
									  		<tr>
									  			<td>客户经理提成（元）</th>
									  			<td id="orderFinishedManagerMoney_this"></td>
									  			<td id="orderBusyManagerMoney_this"></th>
									  			<td id="orderFinishedManagerMoney_getout"></td>
									  			<td id="orderBusyManagerMoney_getout"></td>
									  			<td id="orderCanceledManagerMoney"></td>
									  			<td id="orderFinishedManagerMoney_comein"></th>
									  			<td id="orderBusyManagerMoney_comein"></th>
									  			<td id="orderTotalManagerMoney"></th>
									  		</tr>
									  		<tr>
									  			<td>介绍提成（元）</th>
									  			<td id="orderFinishedRebateMoney_this"></td>
									  			<td id="orderBusyRebateMoney_this"></th>
									  			<td id="orderFinishedRebateMoney_getout"></td>
									  			<td id="orderBusyRebateMoney_getout"></td>
									  			<td id="orderCanceledRebateMoney"></td>
									  			<td id="orderFinishedRebateMoney_comein"></th>
									  			<td id="orderBusyRebateMoney_comein"></th>
									  			<td id="orderTotalRebateMoney"></th>
									  		</tr>
									  	</tbody>
									  </table>
									  
   									  
									</div>
								</div>
								
								<p><font color="red">注：（1）如果外派或者调入订单被销单，则不加入外派和调入订单统计，在订单所在的本公司销单中单独统计！</font></p>
								<p><font color="red">注：（2）所有的营销活动财务记录不在这里体现！</font></p>
								
							</div>
						</div>
				    </div>
				 
			    </div>
			</div>
			 
		</div>
		
	</div>
</div>

</@override>


<@override name="footer">
<script>
	window.daijia = {ctx:'${ctx}','main':false};
	<@shiro.isMainCompany>
		window.daijia.main=true;
	</@shiro.isMainCompany>
</script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.min.js"></script>
<script src="${ctx}/assets/js/bootstrap-datetimepicker.zh-CN.js"></script>
<script src="${ctx}/assets/js/chart/freightCompositive.js"></script>
</@override>
<@extends name="../layout.ftl"/>
